// 关于新冠预约的接口
import request from '../utils/request'

// 获取新冠预约时段
export const getXinTimes=()=>{
	return request("/newapptime","get")
}

// 确定预约新冠
export const sureYuyue=(data)=>{
	return request("/rescovid","post",data)
}
// 获取省
export const getProvince=()=>{

	return new Promise((resolve)=>{
		uni.request({
			url:"https://api.it120.cc/common/region/v2/province",
			success(res){
				resolve(res.data.data)
			}
		})
	})
}
// 获取市
// https://api.it120.cc/common/region/v2/province
//  pid 省或市的id
export const getCity=(pid)=>{
	return new Promise((resolve)=>{
		uni.request({
			url:"https://api.it120.cc/common/region/v2/child",
			data:{
				pid:pid
			},
			success(res){
				resolve(res.data.data)
			}
		})
	})
}

// 获取预约的新馆疫苗订单
export const getXinOrder=()=>request("/coviduser_order","get")